package exam.service.impl;

import exam.bean.PaperLevel;
import exam.dao.PaperLevelDao;
import exam.service.IPaperLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PaperLevelServiceImpl implements IPaperLevelService {
    @Autowired
    PaperLevelDao paperLevelDao;
    @Override
    public List<PaperLevel> selectInfo() {
        return paperLevelDao.selectInfo(null);
    }

    @Override
    public int insertInfo(PaperLevel paperLevel) {
        return paperLevelDao.insertInfo(paperLevel);
    }

    @Override
    public int deleteInfo(int id) {
        return paperLevelDao.deleteInfo(id);
    }

    @Override
    public int updateInfo(PaperLevel paperLevel) {
        return paperLevelDao.updateInfo(paperLevel);
    }

    @Override
    public PaperLevel selectInfoSingle(Map<String, Object> map) {
        return paperLevelDao.selectInfo(map).get(0);
    }
}
